Distributing application traffic to servers based on dynamic service response time

ABSTRACT

Provided are methods and systems for distributing application traffic. A method for distributing application traffic may commence with relaying a first service request for a first service session from a service gateway to a server. The first service request may be received from a host and may be associated with a service request time. The method may further include receiving, from the server, a service response. The service response may be associated with a service response time. The method may continue with calculating a service processing time based on the service request time and the service response time and comparing the service processing time with an expected service processing time. The method may further include receiving, from the host, a second service request for a second service session. The method may continue with selectively relaying the second server request to the server based on the service processing time.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. Nonprovisional patentapplication Ser. No. 15/882,755, filed Jan. 29, 2018, titled“Distributing Application Traffic to Servers Based On Dynamic ServiceResponse Time” which is a continuation of, and claims the prioritybenefit of, U.S. Nonprovisional patent application Ser. No. 15/460,029,filed Mar. 15, 2017, titled “Distributing Application Traffic to ServersBased On Dynamic Service Response Time”, now U.S. Pat. No. 9,961,136,issued on May 1, 2018, which is a continuation of, and claims thepriority benefit of, U.S. Nonprovisional patent application Ser. No.12/958,435, filed Dec. 2, 2010, titled “Distributing Application Trafficto Servers Based on Dynamic Service Response Time”, now U.S. Pat. No.9,609,052, issued on Mar. 28, 2017. The disclosures of the aboveapplications are hereby incorporated by reference in their entirety,including all references cited therein.

TECHNICAL FIELD

This disclosure relates generally to data communications, and morespecifically, to a method and system for distributing applicationtraffic to servers based on service process parameters.

BACKGROUND OF THE DISCLOSURE

Web services and cloud computing are deployed in an unprecedented pace.New servers are unloaded and installed at data centers every day.Demands of web services and corporate computing come from alldirections. Consumer oriented services include smartphone apps, mobileapplications such as location based services, turn-by-turn navigationservices, e-book services such as Kindle™, video applications such asYouTube™ or Hulu™, music applications such as Pandora™ or iTunes™,Internet television services such as Netflix™, and many other fastgrowing consumer Web services. On the corporate front, cloud computingbased services such as Google™ docs, Microsoft™ Office Live andSharepoint™ software, Salesforce.com™'s on-line software services,tele-presence and web conferencing services, and many other corporatecloud computing services.

As a result, more and more servers are deployed to accommodate theincreasing computing needs. Traditionally these servers are managed by aservice gateway such as Application Delivery Controller or Server LoadBalancer (ADC/SLB) are typically network appliances in a fixed module orin a chassis or a software module running in a commoditized serverADC/SLB manage the application traffic to servers based on incomingservice requests. Common methods to distribute traffic among servers isto distribute the service requests based on the applications (HTTP, FTP,HTTPS etc.), service addresses such as URL, priorities based on networkinterfaces or host IP addresses. ADC/SLB may distribute the servicerequests to a server assuming the server is fully available to handlethe service requests. Typically, a fully loaded server does not handleservice requests well. In fact, most if not all service requests sufferdelay or no service available when a server is busy. It is often betternot to further distribute service request to a busy server.

Current ADC/SLB allows a network administrator to set a maximum servicesession capacity so that ADC/SLB does not send more than the maximumcapacity service requests to the server. However, statically configuredlimitation on a server cannot fully utilize the server's capacity andnot all service requests require the same processing from the server. Itis beneficial for an ADC/SLB to determine if a server is busy based onthe service response time from a server such that the ADC/SLB can reducesending further service requests to the server.

Therefore, there is a need for a system and method for an ADC/SLB toprotect a server overloading based on dynamic service response time.

BRIEF SUMMARY

This summary is provided to introduce a selection of concepts in asimplified form that are further described in the Detailed Descriptionbelow. This summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

Provided are computer-implemented methods and systems for distributingapplication traffic. According to one example embodiment, a system fordistributing application traffic may include a server configured toprocess service requests and a service gateway. The service gateway maybe configured to relay a first service request for a first servicesession from the service gateway to the server. The first servicerequest may be received from a host and may be associated with a servicerequest time. The service gateway may be further configured to receive,from the server, a service response. The service response may beassociated with a service response time. The service gateway maycalculate a service processing time for the first service request basedon the service request time and the service response time and comparethe service processing time with an expected service processing time forthe server stored in a datastore. The service gateway may receive, fromthe host, a second service request for a second service session andselectively relay the second server request to the server based on theservice processing time.

According to one example embodiment, a method for distributingapplication traffic may commence with relaying a first service requestfor a first service session from a service gateway to a server of aplurality of servers. The first service request may be received from ahost and may be associated with a service request time. The method mayfurther include receiving, from the server, a service response. Theservice response may be associated with a service response time. Themethod may continue with calculating a service processing time for thefirst service request based on the service request time and the serviceresponse time and comparing the service processing time with an expectedservice processing time for the server stored in a datastore. The methodmay further include receiving, from the host, a second service requestfor a second service session. The method may continue with selectivelyrelaying the second server request to the server based on the serviceprocessing time.

Other features, examples, and embodiments are described below. Systemand computer program products corresponding to the above-summarizedmethods are also described and claimed herein.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE FIGURES

The accompanying drawings, where like reference numerals refer toidentical or functionally similar elements throughout the separateviews, together with the detailed description below, are incorporated inand form part of the specification, and serve to further illustrateembodiments of concepts that include the claimed disclosure, and explainvarious principles and advantages of those embodiments.

The methods and systems disclosed herein have been represented whereappropriate by conventional symbols in the drawings, showing only thosespecific details that are pertinent to understanding the embodiments ofthe present disclosure so as not to obscure the disclosure with detailsthat will be readily apparent to those of ordinary skill in the arthaving the benefit of the description herein.

FIG. 1 illustrates a service session between a service gateway and aserver.

FIG. 2 illustrates an embodiment of a method for processing a servicerequest by a service gateway.

FIG. 3 illustrates an embodiment of a method for determining if serveris busy.

FIG. 4 illustrates an embodiment of a method for processing servicerequest based on server busy indicator.

FIG. 5 illustrates an embodiment of a method for processing servicerequests after service gateway updates server busy indicator.

FIG. 6 illustrates an embodiment of a method for processing servicerequests based on a service priority.

FIG. 7 is a flowchart illustrating an embodiment of a method forprocessing a service request by a service gateway.

FIG. 8 is a flowchart illustrating an embodiment of a method forprocessing service request based on server busy indicator.

DETAILED DESCRIPTION

Embodiments of the present disclosure can take the form of an entirelyhardware embodiment, an entirely software embodiment or an embodimentcontaining both hardware and software elements. In a preferredembodiment, the invention is implemented in software, which includes butis not limited to firmware, resident software, etc.

Furthermore, the invention can take the form of a computer programproduct accessible from a computer-usable or computer-readable mediumproviding program code for use by or in connection with a computer orany instruction execution system. For the purposes of this description,a computer-usable or computer readable medium can be any apparatus thatcan contain, store, communicate, propagate, or transport the program foruse by or in connection with the instruction execution system,apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system (or apparatus or device) or apropagation medium. Examples of a computer-readable medium include asemiconductor or solid state memory, magnetic tape, a removable computerdiskette, a random access memory (RAM), a read-only memory (ROM), arigid magnetic disk and an optical disk. Current examples of opticaldisks include compact disk-read only memory (CD-ROM), compactdisk-read/write (CD-R/W) and DVD.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, point devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modem and Ethernet cards are just a few of thecurrently available types of network adapters.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified local function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the Figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

FIG. 1 illustrates a service session 321 between a service gateway 110and a server 200. The service gateway 110 receives a service request 301from a host 100. Service request 301 is delivered over a data network153. In one embodiment, service request 301 is a Web service requestsuch as a HTTP (Hypertext Transport Protocol) request, a secure HTTPrequest, an FTP (File Transfer Protocol) request, a file transferrequest, a SIP (Session Initiation Protocol) session request, a requestbased on Web technology, a video or audio streaming request, a Webconferencing session request, or any request over the Internet orcorporate network.

Host 100 is a computing device with network access capabilities. Thehost 100 is operationally coupled to a processor 103 and a computerreadable medium 104. The computer readable medium 104 stores computerreadable program code for implementing the various embodiments of thepresent invention as described herein. In one embodiment, host 100 is aworkstation, a desktop personal computer or a laptop personal computer.In one embodiment, host 100 is a Personal Data Assistant (PDA), asmartphone, or a cellular phone. In one embodiment, host 100 is aset-top box, an Internet media viewer, an Internet media player, a smartsensor, a smart medical device, a net-top box, a networked televisionset, a networked DVR, a networked Blu-ray player, or a media center.

In one embodiment, data network 153 is an Internet Protocol (IP)network. In one embodiment, data network 153 is a corporate data networkor a regional corporate data network. In one embodiment, data network153 is an Internet service provider network. In one embodiment, datanetwork 153 is a residential data network. In one embodiment, datanetwork 153 includes a wired network such as Ethernet. In oneembodiment, data network 153 includes a wireless network such as a WiFinetwork, or cellular network.

The service gateway 110 is operationally coupled to a processor 113 anda computer readable medium 114. The computer readable medium 114 storescomputer readable program code, which when executed by the processor113, implements the various embodiments of the present invention asdescribed herein. In some embodiments, service gateway 110 isimplemented as a server load balancer, an application deliverycontroller, a service delivery platform, a traffic manager, a securitygateway, a component of a firewall system, a component of a virtualprivate network (VPN), a load balancer for video servers, or a gatewayto distribute load to a plurality of servers.

Server 200 is operationally coupled to a processor 213 and a computerreadable medium 214. The computer readable medium 214 stores computerreadable program code, which when executed by the processor 213,implements the various embodiments of the present invention as describedherein. In some embodiments, the computer readable program codeimplements server 200 as a Web server, a file server, a video server, adatabase server, an application server, a voice system, a conferencingserver, a media gateway, a SIP server, a remote access server, a VPNserver, or a media center.

Service gateway 110 connects to server 200 via data network 155. In oneembodiment, data network 155 is the same as data network 153. In oneembodiment, data network 155 is different from data network 153. In oneembodiment, host 100 does not have direct access to data network 155. Inone embodiment, host 100 has direct access to data network 155.

FIGS. 2 and 7 illustrate an embodiment of a method for processing aservice request 301 by service gateway 110. In an embodiment, servicegateway 110 receives service request 301 from host 100, and relaysservice request 301 to server 200 (701) by establishing service session321 between service gateway 110 and server 200. Service gateway 110determines a service request time 361 for service session 321 (702). Inone embodiment the service request time 361 is a time stamp such as atime of the day, a system time, a time counter. In one embodimentservice request time 361 is a time when service gateway 110 sendsservice request 301 to server 200. In one embodiment, service requesttime 361 is a time when service gateway 110 receives from server 200 anacknowledgement of receiving service request 301.

After server 200 processes service request 301, server 200 responds witha service response 352. In one embodiment, service response 352 includesa web page, a document, a file, a picture, a streaming of audio or videosignals, or a voice call. In one embodiment, service response 352includes an error indication 354. Error indication 354 may include aHTTP error status code, an FTP error code, SIP error message, or anyother error code.

Service gateway 110 receives service response 352 and relays the serviceresponse 352 to host 100 (703). Service gateway 110 determines serviceresponse time 362 upon receipt of service response 352 (704). In anembodiment, service response time 362 is a time stamp such as a time ofthe day, a system time, a time counter, and is compatible with servicerequest time 361. In one embodiment, service response time 362 is a timewhen service gateway 110 receives service response 352. In oneembodiment, service response time 362 is a time when service gateway 110receives first piece of information of service response 352. In oneembodiment, service response time 362 is a time when service gateway 110receives the last piece of information of service response 352. In oneembodiment, service response time 362 is a time when service gateway 110disconnects service session 321 from server 200. In one embodiment,service response time 362 is included in service response 352.

After determining service request time 361 and service response time362, service gateway 110 calculates service processing time 360 forservice request 301 from the service request time and service responsetime (705). Service processing time 360 typically measures the durationbetween service request time 361 and service response time 362. In oneexample, service gateway 110 subtracts service request time 361 fromservice response time 362 to obtain service processing time 360. Inanother example, service gateway 110 calculates the duration betweenservice request time 361 and service response time 362 to determineservice process time. For example, service processing time 360 is 10milliseconds, 5 milliseconds, 247 milliseconds, 3 seconds, 15 seconds, 1minute, 75 microseconds, or 289 units of time.

In one embodiment, service gateway 110 verifies service response 352prior to calculating service processing time 360. In an example, servicegateway 110 verifies service response 352 if the response contains anerror indication 354. In one embodiment, if there is an error indicatedin error indication 354, service gateway 110 does not calculate serviceprocessing time 360 for the service request 301.

In one embodiment, service gateway 110 includes a completed servicesession counter 326, which counts the number of completed servicesessions between service gateway 110 and server 200. In one embodiment,service gateway 110 increments the completed service session counter 326by 1 after service gateway 110 receives service response 352 or afterservice gateway 110 disconnects service session 321 from server 200. Inone embodiment, service gateway 110 increments the completed servicesession counter 326 by 1 after determining service processing time 360.

FIG. 3 illustrates an embodiment of a method for determining if server200 is busy. Service gateway 110 includes a server busy indicator 378for server 200, indicating if server 200 is busy. In one embodiment, avalue of 0 or ‘Not Busy’ for server busy indicator 378 indicates server200 is not busy while a value of 1 or ‘Busy’ indicates server 200 isbusy. Service gateway 110 updates server busy indicator 378 based onservice processing time 360.

Service gateway 110 includes an expected service processing time 374.Referring to both FIGS. 3 and 7, service gateway 110 compares serviceprocessing time 360 with expected service processing time 374 (706). Inresponse to determining that the service processing time exceedsexpected service processing time 374, service gateway 110 updates serverbusy indicator 378 to ‘Busy’ (708). Service processing time 360 may needto be at least 50% larger than expected service processing time 374 inorder to exceed expected service processing time 374. In variousembodiments, service processing time 360 is at least 300% larger thanexpected service processing time 374. Service processing time 360 may belarger than expected service processing time 374. After updating serverbusy indicator 378, service gateway 110 receives a next service requestfrom host 100.

Service gateway 110 determines whether service processing time 360 isless than expected service processing time 374 (707), and in response,service gateway 110 updates server busy indicator 378 to ‘Not Busy’(709). After updating server busy indicator 378, service gateway 110receives a next service request from host 100.

Expected service processing time 374 may be based on service request301. In various embodiments, service request 301 comprises a servicerequest Universal Resource Locator (URL), and expected serviceprocessing time 374 is configured according to a service attribute 379.The service attribute 379 is an attribute affecting the expected serviceprocessing time 374. For example, different protocols would processservice requests at different rates, and thus would have differentexpected service processing times. Service attribute 379 is based onservice request URL, or part of service request URL such as the domainname, a web folder name in the web site, a document type, or a protocolindicated in service request URL. For example, if a hypothetical servicerequest URL is “www.abc.com/shops/shoe.html”. Service attribute 379 isbased on domain name “www.abc.com”, web folder “www.abc.com/shops”,document type .html (or other document type such as .php, .asp, etc.),protocol http (or other protocols such as ftp, https, sip, etc.).Service attribute 379 may also be related to program code implemented onserver 200. For example, server 200 is a web server using Apache webserver software, Microsoft web server software, Oracle web serversoftware or other web server software. Service attribute 379 is relatedto the web server software.

In various embodiments, service attribute 379 is based on the domainname and the expected service processing time 374 is 10 milliseconds.Service attribute 379 may also be based on HTTP protocol with anexpected service processing time 374 of 75 milliseconds. In otherembodiments, service attribute 379 is based on FTP file downloadprotocol and the expected service processing time 374 is 2 minutes. Instill other embodiments, service attribute 379 is based on HTML documenttype and the expected service processing time 374 is 20 milliseconds.

In one embodiment, service attribute 379 relates to program codeimplemented on server 200. In an embodiment, server 200 uses Apache webserver software and expected processing time is 50 milliseconds. In anembodiment, server 200 uses Microsoft web server software and expectedprocessing time is 90 milliseconds.

In one embodiment, service attribute 379 relates to a plurality ofattributes mentioned in above description. Expected processing time maybe determined by a summation of a plurality of expected processing timesfor the plurality of attributes.

In one embodiment, service gateway 110 includes a datastore 380, whichstores the expected service processing time 374 and associated serviceattribute 379. In an embodiment, service gateway 110 compares servicerequest 301 or server 200 against service attribute 379 in datastore380. If there is a match, service gateway 110 retrieves expected serviceprocessing time 374 associated with the matched service attribute 379,and compares the retrieved expected service processing time 374 with theservice processing time 360. In one embodiment, expected serviceprocessing time 374 is not related to any service attribute. Servicegateway 110 retrieves expected service processing time 374 and comparesto service processing time 360.

In one embodiment, expected service processing time 374 is configured bya user.

In one embodiment, expected service processing time 374 is automaticallydetermined based on service processing times of previous servicesessions. Upon determining service processing time 360, service gateway110 calculates an adjusted expected service processing time 376 by usingthe formula:

${{adjusted}\mspace{14mu} {expected}\mspace{14mu} {service}\mspace{14mu} {processing}\mspace{14mu} {time}} = \frac{\begin{pmatrix}{\begin{matrix}{{expected}\mspace{14mu} {service}\mspace{14mu} {processing}\mspace{14mu} {time}*} \\\left. \left( {{{completed}\mspace{14mu} {service}\mspace{14mu} {session}\mspace{14mu} {counter}} - 1} \right) \right)\end{matrix} +} \\{{service}\mspace{14mu} {processing}\mspace{14mu} {time}}\end{pmatrix}}{{completed}\mspace{14mu} {service}\mspace{14mu} {session}\mspace{14mu} {counter}}$

Service gateway 110 calculates adjusted expected service processing time376 prior to changing competed service session counter 326. Servicegateway 110 does not adjust expected service processing time 374 ifservice processing time 360 exceeds expected service processing time374, or if service response 352 includes an error indication 354. Inthis embodiment, service gateway 110 does not change completed servicesession counter 326.

In one embodiment, expected service processing time 374 is associatedwith service attribute 379. Completed service session counter 326 isalso associated with service attribute 379 in order to implementseparate counters for each service attribute. Service gateway 110 checksif service request 301 or server 200 matches service attribute 379 priorto calculating adjusted expected service processing time 376.

In one embodiment, service gateway 110 replaces expected serviceprocessing time 374 with adjusted expected service processing time 376.The adjusted expected service processing time 376 becomes the expectedservice processing time 374 for the next service session between theservice gateway 110 and the server 200.

After the service gateway 110 updates server busy indication, theservice gateway 110 receives a next service request from the host (71)and the process repeats (710).

FIGS. 4 and 8 illustrate an embodiment of a method for processingservice request 301 based on server busy indicator 378. Service gateway110 includes a service request buffer 331. Service gateway 110 receivesservice request 301 from host 100 (801). Service gateway 110 putsservice request 301 into service request buffer 331. In otherembodiments, service gateway 110 checks server busy indicator 378 (802).When the server busy indicator 378 indicates server 200 is ‘Busy’ (803),service gateway 110 places service request 301 into service requestbuffer 331 (804). When server busy indicator 378 indicates server 200 is‘Not Busy’ (803), service gateway 110 relays service request 301 toserver 200 (701), as described above with FIGS. 2 and 7. In yet anotherembodiment, when server busy indicator 378 indicates server 200 is ‘NotBusy’, service gateway 110 checks if service request buffer 331 is empty(805). If service request buffer 331 is empty, service gateway 110relays service request 301 to server 200 (701). If service requestbuffer 331 is not empty, the service gateway 110 places service request301 into service request buffer 331 (806). The service gateway 110 thenrelays each service request in the service request buffer 331 to server200 (701) until the service request buffer 331 is empty or until theserver busy indicator 378 is changed to ‘Busy’.

FIG. 5 illustrates an embodiment of a method for processing servicerequests after service gateway 110 updates server busy indicator 378.Service gateway 110 processes service request 301 in service requestbuffer 331 according to different values of server busy indicator 378.In one embodiment, server busy indicator 378 has an updated value of‘Not Busy’. Service gateway 110 examines service request buffer 331 andfinds service request 301. Service gateway 110 replays service request301 to server 200 (701).

In one embodiment, server busy indicator 378 has an updated value of‘Busy’. In one embodiment, service gateway 110 does not immediatelyprocess service request buffer 331. Service gateway 110 includes a timer119. When timer 119 expires, service gateway 110 finds the servicerequest 301 in the service request buffer 331 and relays service request301 in service request buffer 331 to server 200 (701). Timer 119 may beconfigured for duration of, for example, 1 minute, 30 seconds, 1 second,400 milliseconds, 5 milliseconds, 300 microseconds, or any otherduration such that service to service request 301 is not severelyaffected. In one embodiment, time duration is based on attributes of theservice request 301.

FIG. 6 illustrates an embodiment of a method for processing servicerequests based on a service priority. In one embodiment, service request303 is associated with a service priority 403. In a scenario, servicepriority 403 is based on service request 303 URL. In one scenario,service priority 403 is based on host 100, such as host 100 IP address,host 100 user identity. In one scenario, service priority 403 isassociated to the network interface from which service gateway 110receives service request 303. Service gateway 110 determines servicepriority 403 of service request 303.

Service request buffer 331 is configured to store service requests withservice priority 401. In the embodiment where server busy indicator 378has an updated value of ‘Busy’, service gateway 110 compares servicepriority 403 to service priority 401. In response to finding a match,service gateway 110 places service request 303 into service requestbuffer 331.

In one embodiment, service gateway 110 includes a second service requestbuffer 332. Service request buffer 332 is configured to store servicerequest with service priority 402, which is higher than service priority401.

In the embodiment where server busy indicator 378 has an updated valueof ‘Not Busy’, service gateway 110 processes service requests in servicerequest buffer 332 prior to service request buffer 331. In oneembodiment, service gateway 110 sends service request 302 in servicerequest buffer 332 to server 200 prior to sending service request 301 inservice request buffer 331 to server 200.

In one embodiment, service gateway 110 processes all service requestsfrom service request buffer 332 before processing service request buffer331. In one embodiment, service gateway 110 includes a serving ratio 117wherein service gateway 110 processes service request buffer 332 andservice request buffer 331 according to ratio 117, where serving ratio117 favors high priority service request buffer 332 to the lowerpriority service request buffer 331 in order to avoid starving the lowerpriority service requests in service request buffer 331.

Although the present invention has been described in accordance with theembodiments shown, one of ordinary skill in the art will readilyrecognize that there could be variations to the embodiments and thosevariations would be within the spirit and scope of the presentinvention. Accordingly, many modifications may be made by one ofordinary skill in the art without departing from the spirit and scope ofthe appended claims.

What is claimed is:
 1. A system for distributing application traffic,the system comprising: a server of a plurality of servers, the serverbeing configured to process service requests; and a service gatewaycomprising a processor and a computer readable storage medium havingcomputer readable program code embodied therewith, wherein when thecomputer readable program code is executed by the processor, causes theservice gateway to: relay a first service request for a first servicesession from the service gateway to the server, the first servicerequest being received from a host and being associated with a servicerequest time; receive, from the server, a service response, the serviceresponse being associated with a service response time; calculate aservice processing time for the first service request based on theservice request time and the service response time; compare the serviceprocessing time with an expected service processing time for the serverstored in a datastore; receive, from the host, a second service requestfor a second service session; and selectively relay the second serverrequest to the server based on the service processing time.
 2. Thesystem of claim 1, wherein the service gateway is further configured todetermine, based on the comparing of the service processing time withthe expected service processing time for the server, whether the serviceprocessing time exceeds the expected service processing time by at leasta threshold amount.
 3. The system of claim 1, wherein the expectedservice processing time is based at least in part on a service attributeof the first service request or a service attribute of the server,wherein the expected service processing time is determined by theservice gateway and stored in the datastore together with a serviceattribute of a service request or a service attribute of one of theplurality of servers, the service gateway determining the expectedservice processing time by: comparing the service attribute of the firstservice request or the service attribute of the server with the serviceattribute in the datastore; and if the service attribute of the firstservice request or the service attribute of the server matches theservice attribute in the datastore, retrieving the expected serviceprocessing time associated with the matching service attribute from thedatastore, wherein the expected service processing time is variablebased on the matching service attribute.
 4. The system of claim 3,wherein the service attribute is one or more of the following: a URL, aprotocol, a domain name, a web folder name, and a document type.
 5. Thesystem of claim 3, wherein the service gateway is further configured toupdate a server busy indicator for the server in response to thecomparing, wherein a server busy indicator for each of the plurality ofservers is maintained at the service gateway.
 6. The system of claim 5,wherein the updating the server busy indicator for the server comprises:in response to determining that the service processing time exceeds theexpected service processing time by at least the threshold amount,updating, by the service gateway, the server busy indicator to indicatethat the server is busy; and in response to determining that the serviceprocessing time does not exceed the expected service processing time byat least the threshold amount, updating, by the service gateway, theserver busy indicator to indicate that the server is not busy.
 7. Thesystem of claim 5, wherein the selectively relaying the second serverrequest to the server comprises: checking, by the service gateway, theserver busy indicator for the server; in response to determining thatthe server busy indicator indicates that the server is busy, placing, bythe service gateway, the second service request in a service requestbuffer of the service gateway and maintaining a connection to the host;and in response to determining that the server busy indicator indicatesthat the server is not busy, relaying, by the service gateway, thesecond service request from the service gateway to the server.
 8. Thesystem of claim 7, wherein the selectively relaying the second servicerequest from the service gateway to the server comprises: checking, bythe service gateway, if the service request buffer is empty; in responseto determining that the service request buffer is empty, relaying, bythe service gateway, the second service request from the service gatewayto the server; and in response to determining that the service requestbuffer is not empty, placing, by the service gateway, the second servicerequest in the service request buffer.
 9. The system of claim 8, whereinthe second service request is associated with a priority, the servicerequest buffer is configured to store service requests associated withthe priority, and wherein the placing the second service request in theservice request buffer of the service gateway further comprises:relaying the second service request in the service request buffer fromthe service gateway to a further server of the plurality of serversaccording to the priority.
 10. The system of claim 1, wherein thecalculating the service processing time for the first service requestcomprises: calculating, by the service gateway, the service processingtime for the first service request as a duration between the servicerequest time and the service response time.
 11. A method fordistributing application traffic, the method comprising: relaying, by aservice gateway, a first service request for a first service sessionfrom the service gateway to a server of a plurality of servers, thefirst service request being received from a host and being associatedwith a service request time; receiving, by the service gateway, from theserver, a service response, the service response being associated with aservice response time; calculating, by the service gateway, a serviceprocessing time for the first service request based on the servicerequest time and the service response time; comparing, by the servicegateway, the service processing time with an expected service processingtime for the server stored in a datastore; receiving, by the servicegateway, from the host, a second service request for a second servicesession; and selectively relaying, by the service gateway, the secondserver request to the server based on the service processing time. 12.The method of claim 11, further comprising determining, by the servicegateway, based on the comparing of the service processing time with theexpected service processing time for the server, whether the serviceprocessing time exceeds the expected service processing time by at leasta threshold amount.
 13. The method of claim 11, wherein the expectedservice processing time is based at least in part on a service attributeof the first service request or a service attribute of the server,wherein the expected service processing time is determined by theservice gateway and stored in the datastore together with a serviceattribute of a service request or a service attribute of one of theplurality of servers, the service gateway determining the expectedservice processing time by: comparing the service attribute of the firstservice request or the service attribute of the server with the serviceattribute in the datastore; and if the service attribute of the firstservice request or the service attribute of the server matches theservice attribute in the datastore, retrieving the expected serviceprocessing time associated with the matching service attribute from thedatastore, wherein the expected service processing time is variablebased on the matching service attribute.
 14. The method of claim 11,further comprising updating, by the service gateway, a server busyindicator for the server in response to the comparing, wherein a serverbusy indicator for each of the plurality of servers is maintained at theservice gateway.
 15. The method of claim 14, wherein the updating theserver busy indicator for the server comprises: in response todetermining that the service processing time exceeds the expectedservice processing time by at least the threshold amount, updating, bythe service gateway, the server busy indicator to indicate that theserver is busy; and in response to determining that the serviceprocessing time does not exceed the expected service processing time byat least the threshold amount, updating, by the service gateway, theserver busy indicator to indicate that the server is not busy.
 16. Themethod of claim 14, wherein the selectively relaying the second serverrequest to the server comprises: checking, by the service gateway, theserver busy indicator for the server; in response to determining thatthe server busy indicator indicates that the server is busy, placing, bythe service gateway, the second service request in a service requestbuffer of the service gateway and maintaining a connection to the host;and in response to determining that the server busy indicator indicatesthat the server is not busy, relaying, by the service gateway, thesecond service request from the service gateway to the server.
 17. Themethod of claim 16, wherein the selectively relaying the second servicerequest from the service gateway to the server comprises: checking, bythe service gateway, if the service request buffer is empty; in responseto determining that the service request buffer is empty, relaying, bythe service gateway, the second service request from the service gatewayto the server; and in response to determining that the service requestbuffer is not empty, placing, by the service gateway, the second servicerequest in the service request buffer.
 18. The method of claim 17,wherein the second service request is associated with a priority, theservice request buffer is configured to store service requestsassociated with the priority, and wherein the placing the second servicerequest in the service request buffer of the service gateway furthercomprises: relaying the second service request in the service requestbuffer from the service gateway to a further server of the plurality ofservers according to the associated priority.
 19. The method of claim11, wherein the calculating the service processing time for the firstservice request comprises: calculating, by the service gateway, theservice processing time for the first service request as a durationbetween the service request time and the service response time.
 20. Asystem for distributing application traffic, the system comprising: aserver of a plurality of servers, the server being configured to processservice requests; and a service gateway comprising a processor and acomputer readable storage medium having computer readable program codeembodied therewith, wherein when the computer readable program code isexecuted by the processor, causes the service gateway to: relay a firstservice request for a first service session from the service gateway tothe server, the first service request being received from a host andbeing associated with a service request time; receive, from the server,a service response, the service response being associated with a serviceresponse time; calculate a service processing time for the first servicerequest based on the service request time and the service response time;compare the service processing time with an expected service processingtime for the server stored in a datastore to determine whether theservice processing time exceeds the expected service processing time byat least a threshold amount, wherein the expected service processingtime is based at least in part on a service attribute of the firstservice request or a service attribute of the server; update a serverbusy indicator for the server in response to the comparing, wherein aserver busy indicator for each of the plurality of servers is maintainedat the service gateway, wherein the updating the server busy indicatorfor the server comprises: in response to determining that the serviceprocessing time exceeds the expected service processing time by at leastthe threshold amount, updating, by the service gateway, the server busyindicator to indicate that the server is busy; and in response todetermining that the service processing time does not exceed theexpected service processing time by at least the threshold amount,updating, by the service gateway, the server busy indicator to indicatethat the server is not busy; receive, from the host, a second servicerequest for a second service session; and selectively relay the secondserver request to the server based on the service processing time,wherein the selectively relaying the second server request to the servercomprises: checking, by the service gateway, the server busy indicatorfor the server; in response to determining that the server busyindicator indicates that the server is busy, placing, by the servicegateway, the second service request in a service request buffer of theservice gateway and maintaining a connection to the host; and inresponse to determining that the server busy indicator indicates thatthe server is not busy, relaying, by the service gateway, the secondservice request from the service gateway to the server.